﻿using System;
using System.Diagnostics;

namespace DBAccessLibrary.Common
{
    public static class StopwatchHelper
    {
        public static void TimingAction(string desc, Action action)
        {
#if DEBUG
            Stopwatch sw = Stopwatch.StartNew();
#endif
            action();
#if DEBUG
            sw.Stop();
            Console.WriteLine(desc + sw.Elapsed.ToString());
#endif
        }
    }
}
